﻿using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPF自由布局.ViewModels
{
    public class MainWindowViewModel : ReactiveObject
    {
        public ObservableCollection<SensorViewModel> Sensors { get; set; }

        public MainWindowViewModel()
        {
            LoadSensorData();
        }

        private void LoadSensorData()
        {
            Sensors = new ObservableCollection<SensorViewModel>
                {
                    new SensorViewModel("温度传感器"),
                    new SensorViewModel("湿度传感器"),
                };
        }
    }
}
